package nju.software.tagmanager.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import nju.software.tagmanager.pojo.dto.CategoryPageQueryDTO;
import nju.software.tagmanager.pojo.dto.ServiceQueryDTO;
import nju.software.tagmanager.pojo.entity.Category;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import nju.software.tagmanager.pojo.vo.BaseVO;
import nju.software.tagmanager.pojo.vo.CategoryVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 97942
 * @description 针对表【category(标签类别)】的数据库操作Mapper
 * @createDate 2024-01-12 16:03:24
 * @Entity nju.software.tagmanager.pojo.entity.Category
 */
public interface CategoryMapper extends BaseMapper<Category> {

    List<Category> find(ServiceQueryDTO query);

    IPage<CategoryVO> search(@Param("query") CategoryPageQueryDTO query, Page<CategoryVO> page);

    List<BaseVO> findByTagId(@Param("tagId") Integer tagId);
}




